package wish.tagChecker;

import java.util.Set;

public class NumberTagChecker implements TagSimilarityChecker {

	private int tags;
	private int allTags;

	public NumberTagChecker(int tags, int allTags){
		
		this.tags = tags;
		this.allTags = allTags;
		
	}
	
	@Override
	public boolean acceptTags(Set<String> firstDistinctTags,
			Set<String> secondDistinctTags) {
	
		return Math.abs(firstDistinctTags.size() - secondDistinctTags.size()) <= tags;

	}

	@Override
	public boolean acceptAllTags(Set<String> firstDistinctTagsAllLevel,
			Set<String> secondDistinctTagsAllLevel) {

		return Math.abs(firstDistinctTagsAllLevel.size() - secondDistinctTagsAllLevel.size()) <= allTags;
		
	}

}
